'use strict';
//获取数据库的引用
const db = uniCloud.database(); 
// 获取集合的引用 表
const usercollection = db.collection('user');
exports.main = async (event, context) => {
let type = event.type;
if(type == 0){
//老人
let res = await usercollection.where({	
        userType:"0"
	}).get()
	return res;
}else{
//志愿者	
let res = await usercollection.where({	
        userType:"1"
	}).get()
	return res;
}
};
